<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">namespace <xsl:value-of select="CogDataSet/ViewInfo/Namespace"/>
{
    public partial class <xsl:value-of select="CogDataSet/ViewInfo/ClassPrefix"/>DataSet
    {<xsl:for-each select="CogDataSet/ViewInfo">
        public static <xsl:value-of select="ManagedTable"/>DataTable Load<xsl:value-of select="ManagedTable"/>()
        {
            var data = new <xsl:value-of select="ManagedTable"/>DataTable();
            data.Merge(ExecuteQuery("SELECT * FROM <xsl:value-of select="Schema"/>.<xsl:value-of select="ManagedTable"/>"));
            return data;
        }
</xsl:for-each>
    }
}
    </xsl:template>
</xsl:stylesheet>
